﻿
Imports extremo
Public Class NuevasReservas
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click

        Try
            Dim negocio = New ReservaNegocio
            negocio.insertar(Me.txtDeporte.Text, Me.txtCantidad.Text, Me.txtFecha.Text, Me.txtIdevento.Text, Me.txtIdusuario.Text)

            Me.txtDeporte.Text = ""
            Me.txtCantidad.Text = ""
            Me.txtFecha.Text = ""
            Me.txtIdevento.Text = ""
            Me.txtIdusuario.Text = ""
           
            Response.Write("Se insertó correctamente")

        Catch ex As Exception
            Response.Write("Problemas al insertar")
        End Try

    End Sub

    Protected Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button2.Click
        Response.Redirect("Reservas.aspx", True)
    End Sub
End Class